using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Azuriranje : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        RN_WebService servis = new RN_WebService();
        loginname.Text = servis.vrati_user(Session["aname"].ToString());

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        RN_WebService servis = new RN_WebService();

        int pom = servis.dodadi(tip.SelectedValue.ToString(), kategorija.SelectedValue.ToString(), banka.SelectedValue.ToString(), golemina.Text, cena.Text);
        if (pom == 1)
        {
            poraka.Text = "Added successfuly!";
            poraka.Visible = true;

            System.Drawing.Color clr;
            clr = System.Drawing.Color.Green;
            poraka.ForeColor = clr;

        }
        else
        {
            poraka.Text = "Try again!";
            poraka.Visible = true;
            System.Drawing.Color clr;
            clr = System.Drawing.Color.Red;
            poraka.ForeColor = clr;
        }
    }

    protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
    {
        FormsAuthentication.SignOut();
        Response.Redirect("Login.aspx");
    }


}
